There's no semantic difference, just that "denn" is perhaps a bit more formal. There are two grammatical differences, though:
– "denn" starts a main clause (verb in second position), "weil" a subclause (verb in last position),
– and the "denn" clause can't be put before the connected one, but both positions are possible for the "weil" subclause: "A, weil B", "weil C, D" and "E, denn F" are all ok, but "denn G, H" is not.