It is a convention that can be seen heviliy used in the sitecore.dll's. It is used to throw an exception if that condition is not met.
For example if you look at Assert.IsTrue, if the condition is not met the system will throw a "InvalidOperationException"
De-compiling the a method from the Search API I found this.
Assert.IsTrue(local_0 != null, "SearchConfiguration is missing");
Then if we de-compile IsTrue, it gives us
[AssertionMethod]
public static void IsTrue([AssertionCondition(AssertionConditionType.IS_TRUE)] bool condition, string message)
{
if (!condition)
throw new InvalidOperationException(message);
}
To Answer your other question you can use this in your application code, as you can see its just another way of throwing an exception if a condition is not met.
The confusion comes with the use of the word assert, which as you said is usually seen in context of unit tests in a traditional c# .NET solution. As long as you know what the Sitecore assert is doing behind the scenes, its up to you if you want to use it or not.
System.Diagnostics.Debug.Assert
is conditional and will only fire in DEBUG builds of an application. Sitecore.Assert has no such restriction so will raise an InvalidOperationException whenever the test condition fails in both DEBUG and RELEASE builds. – Roderickroderigo