This is usually due to the photos you want to merge. Lightroom is very picky with that. For example, your photos must have the exact same pixel dimensions. If you use non-raw photos that were cropped, even a difference of one pixel will cause it to fail. Same for focal length. If you used a zoom lens, then the slightest change in focal length will cause the merge to fail. Too little overlap between the photos is another cause.