I feel any two people can marry, if they can live happily thereafter.
Now to live happily without creating problems for each other, and fighting over lifestyle, religious preferences, money spending habits, eating habits, going out and 100's of things over which 2 people can disagree.
Small issues like your favorite color or favorite perfume, don't really matter, but then social lifestyle, religion, faith, culture, your festivals, family culture are somethings, differences there can create problems.
So same religion may solve many of these problems, if both follow say Sikhism, now the caste, I used to believe that for a Gursikh caste doesn't matter, and if both are Amritdhari, they are Khalsa, and hence shouldn't care about the caste.
But, off late, looking at my Indian friends, I realize that with different castes, come different lifestyle and habits. So in Indian conditions even caste matters. Same religion and caste help both husband and wife understand each other better.
Also, not only caste, there are other things that make a lot of difference, even if both the boy and the girl belong to same faith/caste:
Education: both are same caste, but 1 is educated, the other 1 is not, you can't marry in such a case, so no caste, better marry a person from other caste.
Money Matters: Highly unlikely, that a rich family marries their son/daughter in a poor family, even if they are same religion/caste.
City/Village: A family living in city, won't adjust to the living conditions in villages (esp Indian villages) even if they are a Rich Landlord.
So basically, marry anywhere, any caste, any faith, if you can live happily thereafter.
For me, I want my wife to be Gursikh, have a religious mindset, I don't care about caste, but only nature. And, if the other person can get along with you, you guys compliment each other. go ahead and marry.
Most Indian Parents, want their kids to marry within their caste. So, if one can't go against their parents, you can't marry inter caste. I guess Sikhism tells us not to fight with parents.
So many people do a fake marriage I heard, just to get the visa or citizenship abroad.
No one is perfect, so check out your preferences, you feel the there are more positives than negatives, that's a green signal.
just some thoughts that came to my mind
bhul chuk maaf
Guru Ji Mehar karan
Waheguru Ji Ka Khalsa
Waheguru Ji Ki Fateh