It seems that we have lots of questions about 是 lately. Lol
See the definition 6 from this dictionary:
This usage of 是 is usually followed with one's action to interrogate or confirm whether they would go for that action. Besides the example above there are more:
Take this pair as an example, 你是去上学吗？vs 你去上学吗？These two sentences are used in different scenarios.
Let's say you run into one of your students on the road, you might figure he/she is more likely to be on his/her way to the school, but that's just your speculation. In order to make sure your suspect is correct, you might use 你是去上学吗？to verify if it's true. You are expecting he/she come back with a yes or no. He might say : 是， 我是去上学 or 不是，我去xxxx.
你去上学吗？ , however, is usually used when you are not sure what he/she is going to do (no clue or previous context) and then you ask if he will go to school at the time. Let's say you and your student are in the doom, and later you find it's about time to go to school, then you might say 你去上学吗？to check whether he will go to school now. The reason why we don't use 你是去上学吗？in this context is that there is no previous context or any sign that he would go to school.
Now that you've seen the difference, another variation for 你是去上学吗？ is 你这是去上学吗？， which denotes the same meaning and is applied in the same scenarios, but with a bit more emphasis.
Back to your example:
In this case, there is a previous context saying 这是我在北京拍的照片。. From there, you can figure she has been to Beijing, and probably first time. So, 你是第一次去北京吗？should be used to check/verify your speculations. However, 你第一次去北京吗？ still can be used in this particular context, because 第一次 here implies that you already got some speculation, which is she has gone to Beijing already, but unsure if it's her first time. But without 第一次, 你是去北京吗？vs 你去北京吗？，they should be used in different scenarios, which has been addressed above.
As for 是...的 structure, it denotes different meanings and used in different scenarios. For example, when there are bunch of people, some go to Beijing, some to Shanghai and some to Guangzhou, you can use 你是去北京的吗？to check if that person belongs to the group going to Beijing. Basically, 是...的 structure can denote an attributive group like in 你是去北京的吗, the way of doing something like in 你是走路去北京的吗 and etc.
Hope this could help.