All three lived during roughly the same period in Britain, although Shakespeare was born more than two decades after the birth of the two queens and survived into the rule of James I. All were influential, although Shakespeare was known primarily for his writing and the two queens for their actions as rulers. Elizabeth I was highly educated and wrote a small number of preserved poems as well as letters and speeches. All three were literate and Christian and would have known Latin as well as English.
Mary, Queen of Scots, or Mary Stuart, was born on 8 December 1542 and was executed on 8 February 1587. She reigned in Scotland from 14 December 1542 to 24 July 1567. She was a Roman Catholic and eventually executed by Elizabeth I for treason.
Elizabeth I was born on 7 September 1533 and died on 24 March 1603. She was a Protestant and reigned from 17 November 1558 until her natural death in 1603, a long and prosperous reign.
William Shakespeare lived from 1564 to 23 April 1616. The evidence concerning his religion is limited, with some scholars arguing that he was Protestant and others for Catholicism. Unlike the two queens, he was not royal or even an aristocrat, but the son of a moderately prosperous middle class family.