God commands us to pray, this makes prayer our solemn duty. It can also be said that God invites us to pray, and this then becomes our privilege. Prayer is both our duty and privilege. Consider these verses:
Jeremiah 29:12-13 "Then shall ye call upon me, and ye shall go and pray unto me, and I will hearken unto you. And ye shall seek me, and find me, when ye shall search for me with all your heart."
Jeremiah 33:3 "Call unto me, and I will answer thee, and show thee great and mighty things, which thou knowest not."
Psalms 91:15 "He shall call upon me, and I will answer him: I will be with him in trouble; I will deliver him, and honour him."
Psalms 145:18 "The LORD is nigh unto all them that call upon him, to all that call upon him in truth."
Isaiah 55:6-7 "Seek ye the LORD while he may be found, call ye upon him while he is near: Let the wicked forsake his way, and the unrighteous man his thoughts: and let him return unto the LORD, and he will have mercy upon him; and to our God, for he will abundantly pardon."
Luke 11:9-10 "And I say unto you, Ask, and it shall be given you; seek, and ye shall find; knock, and it shall be opened unto you. 10For every one that asketh receiveth; and he that seeketh findeth; and to him that knocketh it shall be opened."