Haven't played sports in 7 yrs, played rugby yesterday and have extreme pain under both my knee caps, what could of caused this?

Patella overload. Exposure to repetitive squats, jumps and high impact after a long period little or no exercise can easily provoke pain at the patellofemoral joint. For the knee, and patella to function at capacity the quads and hamstring muscles must be in shape. Next time make the effort to get in shape for the sport before you aggressively try to do it.
Quad weakness. Pain behind the patella can be chondromalacia, but it can also come from overuse. In this case, your muscles may be fine for most activities of daily living, but taking it up to the next level, like playing rugby, may lead to strain and referred pain to the patella area. The answer is to rest until better then start a program of quad strengthening. If they continue to hurt, see an orthopedic doc.