When is it right to use 是什么关系 rather than 有什么关系?
是什么关系 = what is the relationship / connection

有什么关系 = have what relationship / connection

Both are grammatically correct, but in different context, "有什么关系" could mean " what does it matter" e.g. "他死了有什么关系?" = (what does it matter that he died)


A and B 是 XX 关系 =  the relationship between A and B is of XX
A and B 有 XX 关系 = A and B have the relationship of XX
Y 有什么关系 = what does Y matter
Y 没 关系 = Y doesn't matter
Y 没什么关系 = Y doesn't matter whatsoever


Example:

"A 和 B 是 父子的关系" (The relationship between A and B is of father and son)

"A 和 B 有 父子 关系" (A and B have the relationship of father and son)

"你输了有什么关系?" (What does it matters that you lost?)

"你输了没关系" (it doesn't matter that you lost)

"你输了没什么关系" (it doesn't matter whatsoever that you lost)