Allaah vows in the Qur'aan:
By the sun and its brightness
and His Saying:
By the night when it covers
We cannot swear by the sun and the night.
When Allaah vows by something, then that does not mean that it is permissible for us to vow by it because Allaah vows by what He Wills. Allaah vows by that with which it is not permissible for the creation to vow by as the above Verses show.
What can we vow by?
Narrated Sa'd bin 'Ubaidah:
That Ibn 'Umar heard a man saying: "No by the Ka'bah" so Ibn 'Umar said: "Nothing is sworn by other than Allah, for I heard the Messenger of Allah (sallallaahu alayhi wa sallam) say: 'Whoever swears by other than Allah, he has committed disbelief or shirk.'"
[Jaami' Al-Tirmidhi Hadith No. 1535]
We can only vow by Allaah.