Basically, it means "done for no apparent reason; absurd behavior or circumstances. The etymology of the words and the phrase itself appear to be French in origin; "ni rime ni raison".
Didn't find the answer you were looking for?