Question: What is the difference between *to allege* and *to claim*? Can I use them interchangeably? Or perhaps I can only *allege* something illegal?

For example, from CNET:

> 
> Over the past several months, the two companies have been embroiled in
>  litigation in which Apple **alleges** that Samsung illegally copied
>  technology and design aspects of the iPad to create the Galaxy Tab.
> 
> 
> 

If I replace *alleges* with *claims*, does it change the meaning at all?

Answer: 
The only difference is one of diction. "Alleges" is in a much higher register than "claims." "Alleges" is also preferred in legal contexts.
Allege is used when no evidence is available so it is not sure or accurate yet. It is a statement that is made without giving proof, accusing somebody of doing something that is wrong or illegal.

Claim is used when evidence is available and it is sure and true.

the two words are not the same and cannot be used interchangeably.